import hashlib


def get_md5(url):
    #防止用户直接传入非utf-8的格式
    if isinstance(url, str):
        url = url.encode("utf-8")
    m = hashlib.md5()
    m.update(url)
    return m.hexdigest()


if __name__ == "__main__":
    print(get_md5("https://www.hutwanghui.club".encode("utf-8")))
